#pragma once

#include <memory>
#include <filesystem>

#include "memdb/impl/IMeta.h"
#include "memdb/impl/IData.h"

namespace memdb {
namespace impl {

class Factory {
public:
	explicit  Factory(const std::filesystem::path & dbpath) 
	: _dbpath(dbpath)
	{
	}
	virtual ~Factory() {}

	virtual std::unique_ptr<IMeta> createMeta() const = 0;
	virtual std::unique_ptr<IData> createData(const std::string & name) const = 0;

	inline const std::filesystem::path & dbPath() const {
		return _dbpath;
	}

protected:
	std::filesystem::path _dbpath;
};

}//namespace impl
}//namespace memdb

